package com.greensock.easing
{
   public class EaseLookup
   {
      
      private static var _lookup:Object;
       
      
      public function EaseLookup()
      {
         super();
      }
      
      public static function find(param1:String) : Ease
      {
         if(_lookup == null)
         {
            _lookup = {};
            _addInOut(Back,["back"]);
            _addInOut(Bounce,["bounce"]);
            _addInOut(Circ,["circ","circular"]);
            _addInOut(Cubic,["cubic","power2"]);
            _addInOut(Elastic,["elastic"]);
            _addInOut(Expo,["expo","exponential"]);
            _addInOut(Power0,["linear","power0"]);
            _addInOut(Quad,["quad","quadratic","power1"]);
            _addInOut(Quart,["quart","quartic","power3"]);
            _addInOut(Quint,["quint","quintic","strong","power4"]);
            _addInOut(Sine,["sine"]);
            _lookup["linear.easenone"] = _lookup["lineareasenone"] = Linear.easeNone;
            _lookup.slowmo = _lookup["slowmo.ease"] = SlowMo.ease;
         }
         return _lookup[param1.toLowerCase()];
      }
      
      private static function _addInOut(param1:Class, param2:Array) : void
      {
         var _loc3_:String = null;
         var _loc4_:int = param2.length;
         while(--_loc4_ > -1)
         {
            _loc3_ = param2[_loc4_].toLowerCase();
            _lookup[_loc3_ + ".easein"] = _lookup[_loc3_ + "easein"] = param1.easeIn;
            _lookup[_loc3_ + ".easeout"] = _lookup[_loc3_ + "easeout"] = param1.easeOut;
            _lookup[_loc3_ + ".easeinout"] = _lookup[_loc3_ + "easeinout"] = param1.easeInOut;
         }
      }
   }
}
